According to a USB (Universal Serial Bus, universal serial bus) specification, a device driver matching string of a USB device mainly has the following three formats: The first format is formed by a vid (vendor identification, vendor identification), a PID (product identification, product identification), and an MI (Multiple-Interface, Product-Port) number, which is represented in the following form: vid_xxxx&pid_yyyy&mi_zz; the second format is formed by a vid, a subclass (device subclass), and a protocol (device protocol type), which is represented in the following form: vid_xxxx&subclass_yy&prot_zz; the third format is formed by a class (device class), a subclass, and a protocol, which is represented in the following form: class_xx&subclass_yy&prot_zz.
For the first format and the second format, vids may be used to identify different vendors. However, a Windows system does not support the second format and the third format cannot identify each vendor. Therefore, most device driver matching strings of USB devices that are manufactured by each OEM (original equipment manufacturer, original equipment manufacturer) use the device driver matching strings of the first format. In addition, each vendor generally has a suite of drivers applicable to all products of a same kind, and products of the same kind are differentiated by using different PIDs.
To enable a device driver to correctly match a device, a device driver matching string list corresponding to this kind of device needs to be preset in an operating system. When a device requires a driver, it is necessary only to obtain a device driver matching string of the device and search the device driver matching string list for a device driver corresponding to the device driver matching string.
In the process of implementing the matching of the device driver, the inventor finds that the prior art has at least following problems: A defect of the device driver matching string of the first format is that the device driver matching string is limited to the PID of the device; once the PID is changed, a driver matching file needs to be modified, which increases costs in maintenance and certification.